package com.ruoyi.deal.deal_service.service.impl;

import java.util.List;

import com.ruoyi.deal.deal_service.domain.DealInfoService;
import com.ruoyi.deal.deal_service.mapper.DealInfoServiceMapper;
import com.ruoyi.deal.deal_service.service.IDealInfoServiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 订单和服务关联Service业务层处理
 * 
 * @author zhezhi
 * @date 2022-10-06
 */
@Service
public class DealInfoServiceServiceImpl implements IDealInfoServiceService
{
    @Autowired
    private DealInfoServiceMapper dealInfoServiceMapper;

    /**
     * 查询订单和服务关联
     * 
     * @param dealId 订单和服务关联主键
     * @return 订单和服务关联
     */
    @Override
    public DealInfoService selectDealInfoServiceByDealId(Long dealId)
    {
        return dealInfoServiceMapper.selectDealInfoServiceByDealId(dealId);
    }

    /**
     * 查询订单和服务关联(根据服务ID进行查询）
     *
     * @param serviceId 订单和服务关联主键
     * @return 订单和服务关联
     */
    @Override
    public DealInfoService selectDealInfoServiceByServiceId(Long serviceId)
    {
        return dealInfoServiceMapper.selectDealInfoServiceByServiceId(serviceId);
    }


    /**
     * 查询订单和服务关联列表
     *
     * @param dealInfoService 订单和服务关联
     * @return 订单和服务关联
     */
    @Override
    public List<DealInfoService> selectDealInfoServiceList(DealInfoService dealInfoService)
    {
        return dealInfoServiceMapper.selectDealInfoServiceList(dealInfoService);
    }

    /**
     * 新增订单和服务关联
     * 
     * @param dealInfoService 订单和服务关联
     * @return 结果
     */
    @Override
    public int insertDealInfoService(DealInfoService dealInfoService)
    {
        return dealInfoServiceMapper.insertDealInfoService(dealInfoService);
    }

    /**
     * 修改订单和服务关联
     * 
     * @param dealInfoService 订单和服务关联
     * @return 结果
     */
    @Override
    public int updateDealInfoService(DealInfoService dealInfoService)
    {
        return dealInfoServiceMapper.updateDealInfoService(dealInfoService);
    }

    /**
     * 修改订单和服务关联（根据服务ID进行修改）
     *
     * @param dealInfoService 订单和服务关联
     * @return 结果
     */
    @Override
    public int updateDealInfoServiceByServiceId(DealInfoService dealInfoService)
    {
        return dealInfoServiceMapper.updateDealInfoServiceByServiceId(dealInfoService);
    }

    /**
     * 批量删除订单和服务关联
     * 
     * @param dealIds 需要删除的订单和服务关联主键
     * @return 结果
     */
    @Override
    public int deleteDealInfoServiceByDealIds(Long[] dealIds)
    {
        return dealInfoServiceMapper.deleteDealInfoServiceByDealIds(dealIds);
    }

    /**
     * 删除订单和服务关联信息
     * 
     * @param dealId 订单和服务关联主键
     * @return 结果
     */
    @Override
    public int deleteDealInfoServiceByDealId(Long dealId)
    {
        return dealInfoServiceMapper.deleteDealInfoServiceByDealId(dealId);
    }
}
